home *** CD-ROM | disk | FTP | other *** search
- echo $argv
- if $#!=3
- echo usage $0 num1 num2
- elseif $1==0
- return $2+1
- elseif $2==0
- return ack($1-1,1)
- else
- return ack($1-1,ack($1,$2-1))
- endif
- # ack - Ackermann's function. Don't use large parameters; it may exceed the
- # source-file nesting limit. To run, type
- # eval ack (2,2)
- # Ack is presented as is; no warrantee is either expressed or implied
- # as to it's suitability to any purpose whatsoever. You assume all the
- # risk for all damage even if caused by a defect in the software, no matter
- # how awful
-